package com.foreknow.dao;

import com.foreknow.bean.Employee;

import java.util.HashMap;
import java.util.List;

public interface EmployeeMapper {

    /**
     * 根据id(动态sql) state查询
     * @param params
     * @return
     */
    public List<Employee> selectEmployeeByIdLike(HashMap<String,Object> params);

    /**
     * 根据用户名和密码来查询 ,如果没有用户名和密码就根据state(状态)查询
     * @param params
     * @return
     */
    public List<Employee> selectEmployeeByLoginLike(HashMap<String,Object> params);

    /**
     * 根据state查询
     * 当id不为空在原有的基础上拼接id
     * 当用户名和密码不为空
     * 否则就拼接其他的条件,比如性别
     * @param params
     * @return
     */
    public List<Employee> selectEmployeeByChoose(HashMap<String,Object> params);

//    public List<Employee> findEmployeeLike(HashMap<String,Object> params);

    public List<Employee> selectEmployeeLike(HashMap<String,Object> params);

    public Employee selectEmployeeWithId(Integer id);

    public int updateEmployeeIfNecessary(Employee employee);

    public List<Employee> selectEmployeeIn(List<Integer> ids);

    public List<Employee> selectEmployeeLikeName(Employee employee);
}